unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, VCLUnZip, VCLZip;

type
  TForm1 = class(TForm)
    Btnx_1: TButton;
    Btnx_2: TButton;
    procedure Btnx_1Click(Sender: TObject);
    procedure Btnx_2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses
  Class_ZipUtil;

{$R *.dfm}

procedure TForm1.Btnx_1Click(Sender: TObject);
begin
  if TZipUtil.ZipDir('D:\SQLDATA\PRMS\WAITTODELETE','E:\RARRESULT.ZIP') then
  begin
    ShowMessage('true');
  end;
end;

procedure TForm1.Btnx_2Click(Sender: TObject);
begin
  if TZipUtil.ZipFil('D:\SQLDATA\PRMS\WAITTODELETE\HZ2015_PRMS_YZCZ(20150324).bak','E:\RARRESULT_FILE.ZIP') then
  begin
    ShowMessage('true');
  end;
end;

end.
